# +----------------------------------------------------------------------
# | ChatWork智能聊天办公系统
# +----------------------------------------------------------------------
# | 软件声明: 本系统并非自由软件,未经授权任何形式的商业使用均属非法。
# | 版权保护: 任何企业和个人不允许对程序代码以任何形式任何目的复制/分发。
# | 授权要求: 如有商业使用需求,请务必先与版权所有者取得联系并获得正式授权。
# +----------------------------------------------------------------------
# | Author: ChatWork Team <2474369941@qq.com>
# +----------------------------------------------------------------------
from fastapi import APIRouter
from hypertext import response_json, R
from apps.api.schemas import voice_schema as schema
from apps.api.service.voice_service import VoiceService


router = APIRouter(prefix="/voice", tags=["音频接口"])


@router.post("/speech", summary="文本转语音", response_model=R[schema.VoiceSpeechVo])
@response_json
async def speech(params: schema.VoiceSpeechIn):
    return await VoiceService.speech(params.scene, params.rid)


@router.post("/transcriptions", summary="语音转文本")
async def transcriptions():
    # todo 未实现
    await VoiceService.transcriptions()
